/**
 * 商品列表服务
 */
angular.module('home.service', [])
  .factory('HomeFty', function ($q) {
    return {
      // 1.刷新商品列表
      getShopCategory: function () {
        var ShopCategory = [
           {
            names: "臻味肉蟹煲",
            src: "img/category/ms1.jpg",
            typeNumber: '10101',
            score: "4.5",
            sell: "200+",
            per: "￥15",
            operation: "天天神券"
          },
          {
            name: "琼阁院瓦香鸡",
            src: "img/category/ms2.jpg",
            typeNumber: '10102',
            score: "4.5",
            sell: "200+",
            per: "￥15",
            operation: "天天神券"
          },
          {
            name: "双椒兔",
            src: "img/category/ms3.jpg",
            typeNumber: '10103',
            score: "4.5",
            sell: "200+",
            per: "￥15",
            operation: "天天神券"
          },
          {
            name: "虾来啦手打虾滑",
            src: "img/category/ms4.jpg",
            typeNumber: '10104',
            score: "4.5",
            sell: "200+",
            per: "￥15",
            operation: "天天神券"
          },
          {
            name: "冒牌冒菜",
            src: "img/category/ms6.gif",
            typeNumber: '10106',
            score: "4.5",
            sell: "200+",
            per: "￥15",
            operation: "天天神券"
          },
          {
            name: "128鲜味火锅",
            src: "img/category/ms7.jpg",
            typeNumber: '10107',
            score: "4.5",
            sell: "200+",
            per: "￥15",
            operation: "天天神券"
          },
          {
            name: "江湖儿女",
            src: "img/category/ms8.jpg",
            typeNumber: '10108',
            score: "4.5",
            sell: "200+",
            per: "￥15",
            operation: "天天神券"
          },
          {
            name: "塔斯汀中国汉堡",
            src: "img/category/ms9.jpg",
            typeNumber: '10201',
            score: "4.5",
            sell: "200+",
            per: "￥15",
            operation: "天天神券"
          },
        ];
        // 假设数据请求成功
        var deferred = $q.defer();
        deferred.resolve(ShopCategory);
        // console.log(ShopCategory);
        return deferred.promise;

      }

    }
  });